3.2.88 \(\int \frac {(a+b \log (c (e+f x)))^2}{(d e+d f x) (h+i x)} \, dx\) [188]

Optimal. Leaf size=142 \[ -\frac {(a+b \log (c (e+f x)))^2 \log \left (1+\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)}+\frac {2 b (a+b \log (c (e+f x))) \text {Li}_2\left (-\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)}+\frac {2 b^2 \text {Li}_3\left (-\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)} \]

[Out]

-(a+b*ln(c*(f*x+e)))^2*ln(1+(-e*i+f*h)/i/(f*x+e))/d/(-e*i+f*h)+2*b*(a+b*ln(c*(f*x+e)))*polylog(2,(e*i-f*h)/i/(
f*x+e))/d/(-e*i+f*h)+2*b^2*polylog(3,(e*i-f*h)/i/(f*x+e))/d/(-e*i+f*h)

________________________________________________________________________________________

Rubi [A]
time = 0.21, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {2458, 12, 2379, 2421, 6724} \begin {gather*} \frac {2 b \text {PolyLog}\left (2,-\frac {f h-e i}{i (e+f x)}\right ) (a+b \log (c (e+f x)))}{d (f h-e i)}+\frac {2 b^2 \text {PolyLog}\left (3,-\frac {f h-e i}{i (e+f x)}\right )}{d (f h-e i)}-\frac {\log \left (\frac {f h-e i}{i (e+f x)}+1\right ) (a+b \log (c (e+f x)))^2}{d (f h-e i)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(e + f*x)])^2/((d*e + d*f*x)*(h + i*x)),x]

[Out]

-(((a + b*Log[c*(e + f*x)])^2*Log[1 + (f*h - e*i)/(i*(e + f*x))])/(d*(f*h - e*i))) + (2*b*(a + b*Log[c*(e + f*
x)])*PolyLog[2, -((f*h - e*i)/(i*(e + f*x)))])/(d*(f*h - e*i)) + (2*b^2*PolyLog[3, -((f*h - e*i)/(i*(e + f*x))
)])/(d*(f*h - e*i))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2379

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Simp[(-Log[1 +
d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)), x] + Dist[b*n*(p/(d*r)), Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^
(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {(a+b \log (c (e+f x)))^2}{(h+188 x) (d e+d f x)} \, dx &=\frac {\text {Subst}\left (\int \frac {(a+b \log (c x))^2}{d x \left (\frac {-188 e+f h}{f}+\frac {188 x}{f}\right )} \, dx,x,e+f x\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {(a+b \log (c x))^2}{x \left (\frac {-188 e+f h}{f}+\frac {188 x}{f}\right )} \, dx,x,e+f x\right )}{d f}\\ &=-\frac {\text {Subst}\left (\int \frac {(a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d (188 e-f h)}+\frac {188 \text {Subst}\left (\int \frac {(a+b \log (c x))^2}{\frac {-188 e+f h}{f}+\frac {188 x}{f}} \, dx,x,e+f x\right )}{d f (188 e-f h)}\\ &=\frac {\log \left (-\frac {f (h+188 x)}{188 e-f h}\right ) (a+b \log (c (e+f x)))^2}{d (188 e-f h)}-\frac {\text {Subst}\left (\int x^2 \, dx,x,a+b \log (c (e+f x))\right )}{b d (188 e-f h)}-\frac {(2 b) \text {Subst}\left (\int \frac {(a+b \log (c x)) \log \left (1+\frac {188 x}{-188 e+f h}\right )}{x} \, dx,x,e+f x\right )}{d (188 e-f h)}\\ &=\frac {\log \left (-\frac {f (h+188 x)}{188 e-f h}\right ) (a+b \log (c (e+f x)))^2}{d (188 e-f h)}-\frac {(a+b \log (c (e+f x)))^3}{3 b d (188 e-f h)}+\frac {2 b (a+b \log (c (e+f x))) \text {Li}_2\left (\frac {188 (e+f x)}{188 e-f h}\right )}{d (188 e-f h)}-\frac {\left (2 b^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {188 x}{-188 e+f h}\right )}{x} \, dx,x,e+f x\right )}{d (188 e-f h)}\\ &=\frac {\log \left (-\frac {f (h+188 x)}{188 e-f h}\right ) (a+b \log (c (e+f x)))^2}{d (188 e-f h)}-\frac {(a+b \log (c (e+f x)))^3}{3 b d (188 e-f h)}+\frac {2 b (a+b \log (c (e+f x))) \text {Li}_2\left (\frac {188 (e+f x)}{188 e-f h}\right )}{d (188 e-f h)}-\frac {2 b^2 \text {Li}_3\left (\frac {188 (e+f x)}{188 e-f h}\right )}{d (188 e-f h)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 189, normalized size = 1.33 \begin {gather*} \frac {3 a^2 \log (e+f x)+3 a b \log ^2(c (e+f x))+b^2 \log ^3(c (e+f x))-3 a^2 \log (h+i x)-6 a b \log (c (e+f x)) \log \left (\frac {f (h+i x)}{f h-e i}\right )-3 b^2 \log ^2(c (e+f x)) \log \left (\frac {f (h+i x)}{f h-e i}\right )-6 b (a+b \log (c (e+f x))) \text {Li}_2\left (\frac {i (e+f x)}{-f h+e i}\right )+6 b^2 \text {Li}_3\left (\frac {i (e+f x)}{-f h+e i}\right )}{3 d (f h-e i)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(e + f*x)])^2/((d*e + d*f*x)*(h + i*x)),x]

[Out]

(3*a^2*Log[e + f*x] + 3*a*b*Log[c*(e + f*x)]^2 + b^2*Log[c*(e + f*x)]^3 - 3*a^2*Log[h + i*x] - 6*a*b*Log[c*(e
+ f*x)]*Log[(f*(h + i*x))/(f*h - e*i)] - 3*b^2*Log[c*(e + f*x)]^2*Log[(f*(h + i*x))/(f*h - e*i)] - 6*b*(a + b*
Log[c*(e + f*x)])*PolyLog[2, (i*(e + f*x))/(-(f*h) + e*i)] + 6*b^2*PolyLog[3, (i*(e + f*x))/(-(f*h) + e*i)])/(
3*d*(f*h - e*i))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(408\) vs. \(2(140)=280\).
time = 1.18, size = 409, normalized size = 2.88

method result size
risch \(-\frac {a^{2} \ln \left (f x +e \right )}{d \left (e i -f h \right )}+\frac {a^{2} \ln \left (i x +h \right )}{d \left (e i -f h \right )}-\frac {b^{2} \ln \left (c f x +c e \right )^{3}}{3 d \left (e i -f h \right )}+\frac {b^{2} \ln \left (c f x +c e \right )^{2} \ln \left (1+\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 b^{2} \ln \left (c f x +c e \right ) \polylog \left (2, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {2 b^{2} \polylog \left (3, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {b a \ln \left (c f x +c e \right )^{2}}{d \left (e i -f h \right )}+\frac {2 b a \dilog \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 b a \ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}\) \(365\)
derivativedivides \(\frac {-\frac {c f \,a^{2} \ln \left (c f x +c e \right )}{d \left (e i -f h \right )}+\frac {c f \,a^{2} \ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{d \left (e i -f h \right )}-\frac {c f \,b^{2} \ln \left (c f x +c e \right )^{3}}{3 d \left (e i -f h \right )}+\frac {c f \,b^{2} \ln \left (c f x +c e \right )^{2} \ln \left (1+\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 c f \,b^{2} \ln \left (c f x +c e \right ) \polylog \left (2, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {2 c f \,b^{2} \polylog \left (3, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {c f a b \ln \left (c f x +c e \right )^{2}}{d \left (e i -f h \right )}+\frac {2 c f a b \dilog \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 c f a b \ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}}{c f}\) \(409\)
default \(\frac {-\frac {c f \,a^{2} \ln \left (c f x +c e \right )}{d \left (e i -f h \right )}+\frac {c f \,a^{2} \ln \left (c e i -h c f -i \left (c f x +c e \right )\right )}{d \left (e i -f h \right )}-\frac {c f \,b^{2} \ln \left (c f x +c e \right )^{3}}{3 d \left (e i -f h \right )}+\frac {c f \,b^{2} \ln \left (c f x +c e \right )^{2} \ln \left (1+\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 c f \,b^{2} \ln \left (c f x +c e \right ) \polylog \left (2, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {2 c f \,b^{2} \polylog \left (3, -\frac {i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}-\frac {c f a b \ln \left (c f x +c e \right )^{2}}{d \left (e i -f h \right )}+\frac {2 c f a b \dilog \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}+\frac {2 c f a b \ln \left (c f x +c e \right ) \ln \left (\frac {-c e i +h c f +i \left (c f x +c e \right )}{-c e i +h c f}\right )}{d \left (e i -f h \right )}}{c f}\) \(409\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(f*x+e)))^2/(d*f*x+d*e)/(i*x+h),x,method=_RETURNVERBOSE)

[Out]

1/c/f*(-c*f/d*a^2/(e*i-f*h)*ln(c*f*x+c*e)+c*f/d*a^2/(e*i-f*h)*ln(c*e*i-h*c*f-i*(c*f*x+c*e))-1/3*c*f/d*b^2/(e*i
-f*h)*ln(c*f*x+c*e)^3+c*f/d*b^2/(e*i-f*h)*ln(c*f*x+c*e)^2*ln(1+i/(-c*e*i+c*f*h)*(c*f*x+c*e))+2*c*f/d*b^2/(e*i-
f*h)*ln(c*f*x+c*e)*polylog(2,-i/(-c*e*i+c*f*h)*(c*f*x+c*e))-2*c*f/d*b^2/(e*i-f*h)*polylog(3,-i/(-c*e*i+c*f*h)*
(c*f*x+c*e))-c*f/d*a*b*ln(c*f*x+c*e)^2/(e*i-f*h)+2*c*f/d*a*b/(e*i-f*h)*dilog((-c*e*i+h*c*f+i*(c*f*x+c*e))/(-c*
e*i+c*f*h))+2*c*f/d*a*b/(e*i-f*h)*ln(c*f*x+c*e)*ln((-c*e*i+h*c*f+i*(c*f*x+c*e))/(-c*e*i+c*f*h)))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 324 vs. \(2 (134) = 268\).
time = 0.35, size = 324, normalized size = 2.28 \begin {gather*} a^{2} {\left (\frac {\log \left (f x + e\right )}{d f h - i \, d e} - \frac {\log \left (h + i \, x\right )}{d f h - i \, d e}\right )} - \frac {i \, {\left (\log \left (f x + e\right )^{2} \log \left (-\frac {f x + e}{i \, f h + e} + 1\right ) + 2 \, {\rm Li}_2\left (\frac {f x + e}{i \, f h + e}\right ) \log \left (f x + e\right ) - 2 \, {\rm Li}_{3}(\frac {f x + e}{i \, f h + e})\right )} b^{2}}{i \, d f h + d e} - \frac {2 \, {\left (i \, b^{2} \log \left (c\right ) + i \, a b\right )} {\left (\log \left (f x + e\right ) \log \left (-\frac {f x + e}{i \, f h + e} + 1\right ) + {\rm Li}_2\left (\frac {f x + e}{i \, f h + e}\right )\right )}}{i \, d f h + d e} + \frac {{\left (-i \, b^{2} \log \left (c\right )^{2} - 2 i \, a b \log \left (c\right )\right )} \log \left (-i \, h + x\right )}{i \, d f h + d e} + \frac {i \, b^{2} \log \left (f x + e\right )^{3} - 3 \, {\left (-i \, b^{2} \log \left (c\right ) - i \, a b\right )} \log \left (f x + e\right )^{2} - 3 \, {\left (-i \, b^{2} \log \left (c\right )^{2} - 2 i \, a b \log \left (c\right )\right )} \log \left (f x + e\right )}{3 i \, d f h + 3 \, d e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(f*x+e)))^2/(d*f*x+d*e)/(i*x+h),x, algorithm="maxima")

[Out]

a^2*(log(f*x + e)/(d*f*h - I*d*e) - log(h + I*x)/(d*f*h - I*d*e)) - I*(log(f*x + e)^2*log(-(f*x + e)/(I*f*h +
e) + 1) + 2*dilog((f*x + e)/(I*f*h + e))*log(f*x + e) - 2*polylog(3, (f*x + e)/(I*f*h + e)))*b^2/(I*d*f*h + d*
e) - 2*(I*b^2*log(c) + I*a*b)*(log(f*x + e)*log(-(f*x + e)/(I*f*h + e) + 1) + dilog((f*x + e)/(I*f*h + e)))/(I
*d*f*h + d*e) + (-I*b^2*log(c)^2 - 2*I*a*b*log(c))*log(-I*h + x)/(I*d*f*h + d*e) + (I*b^2*log(f*x + e)^3 - 3*(
-I*b^2*log(c) - I*a*b)*log(f*x + e)^2 - 3*(-I*b^2*log(c)^2 - 2*I*a*b*log(c))*log(f*x + e))/(3*I*d*f*h + 3*d*e)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(f*x+e)))^2/(d*f*x+d*e)/(i*x+h),x, algorithm="fricas")

[Out]

integral((-I*b^2*log(c*f*x + c*e)^2 - 2*I*a*b*log(c*f*x + c*e) - I*a^2)/(-I*d*f*h*x + d*f*x^2 + (-I*d*h + d*x)
*e), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {a^{2}}{e h + e i x + f h x + f i x^{2}}\, dx + \int \frac {b^{2} \log {\left (c e + c f x \right )}^{2}}{e h + e i x + f h x + f i x^{2}}\, dx + \int \frac {2 a b \log {\left (c e + c f x \right )}}{e h + e i x + f h x + f i x^{2}}\, dx}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(f*x+e)))**2/(d*f*x+d*e)/(i*x+h),x)

[Out]

(Integral(a**2/(e*h + e*i*x + f*h*x + f*i*x**2), x) + Integral(b**2*log(c*e + c*f*x)**2/(e*h + e*i*x + f*h*x +
 f*i*x**2), x) + Integral(2*a*b*log(c*e + c*f*x)/(e*h + e*i*x + f*h*x + f*i*x**2), x))/d

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(f*x+e)))^2/(d*f*x+d*e)/(i*x+h),x, algorithm="giac")

[Out]

integrate((b*log((f*x + e)*c) + a)^2/((d*f*x + d*e)*(h + I*x)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,\left (e+f\,x\right )\right )\right )}^2}{\left (h+i\,x\right )\,\left (d\,e+d\,f\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(e + f*x)))^2/((h + i*x)*(d*e + d*f*x)),x)

[Out]

int((a + b*log(c*(e + f*x)))^2/((h + i*x)*(d*e + d*f*x)), x)

________________________________________________________________________________________